Block Transform-Based Coding
Transform coding is a compression technique used in many audio, image and video compression systems. Uncompressed digital image and video is typically represented or captured as samples of picture elements or colors at locations in an image or video frame arranged in a two dimensional grid. This is referred to as a spatial-domain representation of the image or video. For example, a typical format for images consists of a stream of 24-bit color picture element samples arranged as a grid. Each sample is a number representing color components at a pixel location in the grid within a color space, such as RGB, or YIQ, among others. Various image and video systems may use various different color, spatial and time resolutions of sampling. Similarly, digital audio is typically represented as time-sampled audio signal stream. For example, a typical audio format consists of a stream of 16-bit amplitude samples of an audio signal taken at regular time intervals.
Uncompressed digital audio, image and video signals can consume considerable storage and transmission capacity. Transform coding reduces the size of digital audio, images and video by transforming the spatial-domain representation of the signal into a frequency-domain (or other like transform domain) representation, and then reducing resolution of certain generally less perceptible frequency components of the transform-domain representation. This generally produces much less perceptible degradation of the digital signal compared to reducing color or spatial resolution of images or video in the spatial domain, or of audio in the time domain.
More specifically, a typical block transform-based codec 100 shown in FIG. 1 divides the uncompressed digital image's pixels into fixed-size two dimensional blocks (X1, . . . Xn), each block possibly overlapping with other blocks. A linear transform 120-121 that does spatial-frequency analysis is applied to each block, which converts the spaced samples within the block to a set of frequency (or transform) coefficients generally representing the strength of the digital signal in corresponding frequency bands over the block interval. For compression, the transform coefficients may be selectively quantized 130 (i.e., reduced in resolution, such as by dropping least significant bits of the coefficient values or otherwise mapping values in a higher resolution number set to a lower resolution), and also entropy or variable-length coded 130 into a compressed data stream. At decoding, the transform coefficients will inversely transform 170-171 to nearly reconstruct the original color/spatial sampled image/video signal (reconstructed blocks {circumflex over (X)}1, . . . {circumflex over (X)}n).
The block transform 120-121 can be defined as a mathematical operation on a vector x of size N. Most often, the operation is a linear multiplication, producing the transform domain output y=M x, M being the transform matrix. When the input data is arbitrarily long, it is segmented into N sized vectors and a block transform is applied to each segment. For the purpose of data compression, reversible block transforms are chosen. In other words, the matrix M is invertible. In multiple dimensions (e.g., for image and video), block transforms are typically implemented as separable operations. The matrix multiplication is applied separably along each dimension of the data.
For compression, the transform coefficients (components of vector y) may be selectively quantized (i.e., reduced in resolution, such as by dropping least significant bits of the coefficient values or otherwise mapping values in a higher resolution number set to a lower resolution), and also entropy or variable-length coded into a compressed data stream.
At decoding in the decoder 150, the inverse of these operations (dequantization/entropy decoding 160 and inverse block transform 170-171) are applied on the decoder 150 side, as shown in FIG. 1. While reconstructing the data, the inverse matrix M1 (inverse transform 170-171) is applied as a multiplier to the transform domain data. When applied to the transform domain data, the inverse transform nearly reconstructs the original time-domain or spatial-domain digital media.
While compressing a still image (or an intra coded frame in a video sequence), most common standards such as MPEG-2, MPEG-4 and Windows Media partition the image into square tiles and apply a block transform to each image tile. The transform coefficients in a given partition (commonly known as block) are influenced only by the raw data components within the block. Irreversible or lossy operations on the encoder side such as quantization cause artifacts to appear in the decoded image. These artifacts are independent across blocks and produce a visually annoying effect known as the blocking effect. Likewise for audio data, when non-overlapping blocks are independently transform coded, quantization errors will produce discontinuities in the signal at the block boundaries upon reconstruction of the audio signal at the decoder. For audio, a periodic clicking effect is heard.
Several techniques are used to combat the blocking effect—the most popular among these are the deblocking filter that smoothes inter block edge boundaries, and spatial extrapolation that encodes differences between the raw input data and a prediction from neighboring block edges. These techniques are not without their flaws. For instance, the deblocking filter approach is “open loop”, i.e. the forward transform process does not take into account the fact that deblocking is going to be performed prior to reconstruction on the decoder side. Besides, both these techniques are computationally expensive.
In order to minimize the blocking effect, cross block correlations can be exploited. One way of achieving cross block correlation is by using a lapped transform as described in H. Malvar, “Signal Processing with Lapped Transforms,” Artech House, Norwood Mass., 1992. A lapped transform is a transform whose input spans, besides the data elements in the current block, a few adjacent elements in neighboring blocks. Likewise, on the reconstruction side the inverse transform influences all data points in the current block as well as a few data points in neighboring blocks.
For the case of 2-dimensional (2D) data, the lapped 2D transform is a function of the current block, together with select elements of blocks to the left, top, right, bottom and possibly top-left, top-right, bottom-left and bottom-right. The number of data points in neighboring blocks that are used to compute the current transform is referred to as the overlap.
Spatial Domain Lapped Transform
The lapped transform can be implemented in the transform domain, as a step that merges transform domain quantities after a conventional block transform. Else, it can be implemented in the spatial-domain by a pre-processing stage that is applied to pixels within the range of overlap. These two implementations are mathematically related and therefore equivalent.
FIG. 2 shows an example of a conventional spatial-domain lapped transform. In the example shown, the overlap is 2 pixels, and two pixels each from the two adjacent blocks shown are pre-processed in pre-processing stage 210. Two pre-processed outputs are sent to each of the blocks for block transform-based coding by codec 100 as in FIG. 1. An inverse of the pre-processing stage is applied at post-processing stage 220 after decoding. With a judicious choice of pre-processing and block transform, a wide range of lapped transforms can be realized.
A key advantage of the spatial domain realization of the lapped transform is that an existing block transform-based codec can be retrofitted with a pre- and post-processing stage to derive the benefits of the lapped transform, i.e., reduced block effect and better compression, using an existing codec framework. Pre-processing 210 and post-processing can be represented as a matrix multiplication as shown in FIG. 3. In the conventional spatial-domain lapped transform 200, the pre-processing and post-processing matrices are inverses of each other, i.e., pre-processing matrix (Pf) and the inverse or post-processing matrix (Pi) multiplied together equal the identity matrix I.
However, there is a critical flaw to the conventional spatial-domain lapped transform that prevents its practical use: the expansion of the range of data subsequent to pre-processing.
More specially, a useful pair of pre- and post-processing matrix operations has the following characteristics:                1. The post processing stage 220 “smoothes” the block boundary—mathematically if post processing is implemented as the matrix multiply {circumflex over (x)}=Piŷ, then the matrix Pi has its eigenvalues ≦1.        2. Since the pre and post processing operations are inverses in the theoretical design, the pre-processing stage has eigenvalues >1, i.e., it is range expansive.        3. Often, a desirable design rule is to require that a linear ramp across the block edge be converted to a step edge at the block boundary by pre-processing. In the example shown in FIG. 4, the pixel values 430-433 of two adjacent blocks in an image initially correspond to a color gradient or linear ramp 410. The pre-processing operation converts these pixel values to lie on a step edge 420. In the post-processing step, the same step edge will be converted back to a linear ramp, thereby also squelching (smoothing) the blocking effect that may result from block transform-based coding.        
Point (3) above leads to a very poor spectral behavior for matrices Pf and Pi.
This causes tremendous range expansion and prevents practical use of the conventional spatial-domain lapped transform in FIG. 2. The problem is further exacerbated in 2 and higher dimensions, since the range expansion is squared or raised to a higher power.
Besides the problem of increased range, the pre- and post-processing steps are typically defined in infinite precision. Since the post-processing stage must be replicated on decoders with different floating point implementations that must match with the “golden” decoder, post-processing is often defined in scaled integer arithmetic. The pre-processing matrix may have entries that are floating point.